﻿using Storage.Mapping.AppStorage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Storage.Services.AppStorage
{
    public interface IAppStorageService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        List<AppStorageMapping> getAllCache();

        /// <summary>
        /// 通过id获取
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AppStorageMapping getById(Guid id);

        /// <summary>
        /// 通过appkey获取
        /// </summary>
        /// <param name="appkey"></param>
        /// <returns></returns>
        AppStorageMapping getByAppKey(string appkey);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Tuple<bool,string> insertStorage(Entities.AppStorage entity);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        void updateStorage(AppStorageMapping model);
    }
}
